using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace EditeurSyntaxiqueVocal.Controls
{
    public partial class RecentFileStartPage : UserControl
    {

        private String _path;
        public RecentFileStartPage()
        {
            InitializeComponent();
            base.Dock = DockStyle.Top;
        }

        public RecentFileStartPage(String Nom, String path)
            : this()
        {
            switch (System.IO.Path.GetExtension(path).ToLower())
            {
                case ".z":
                case ".alg":
                    imageExtensionPictureBox.Image = imageList1.Images[0];
                    break;

                default:
                    imageExtensionPictureBox.Image = null;
                    break;

            }
            NomFileLinkLabel.Text = Nom;
            _path = path;
        }

        public Image PictureBox
        {
            get { return imageExtensionPictureBox.Image; }
            set { imageExtensionPictureBox.Image = value; }
        }

        public String Nom
        {
            get { return NomFileLinkLabel.Text; }
            set { NomFileLinkLabel.Text = value; }
        }

        public string Path
        {
            get { return _path; }
            set { _path = value;}
        }
    }
}
